
from iter03_add_user import from_file_get_data


def read_file(file_name):
    try:
        with open(file_name,encoding='utf-8') as f:
            content = f.readlines()
            user_data = content[0]
            return user_data
    except Exception as e:
        print(e)


if __name__ == '__main__':
    result = read_file('user_data.txt')
    print(type(result))
    print(result)


    # ["[{'role':'admin','account':'admin','password':'123456','dept':'test'},{'account':'test','password':'123456','role':'user','dept':'test'}]"]